﻿<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%  
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
pageContext.setAttribute("ctx",basePath);
 %>
<html>
	<head>
		<title>swf 上传${ctx }</title>
		<link href="scripts/resources/css/ext-all.css" rel="stylesheet"type="text/css" />
		<script type="text/javascript" src="scripts/ext-base.js"></script>
		<script type="text/javascript" src="scripts/ext-all.js"></script>
		<script src="upload/swfupload.js" type="text/javascript"></script>
		<script src="upload/imagefield.js" type="text/javascript"></script>
		<script type="text/javascript"> 

        var base="${ctx }/upload";


  
  Ext.onReady(function(){    
	   Ext.QuickTips.init();
	   Ext.form.Field.prototype.msgTarget = 'side';
	   Ext.BLANK_IMAGE_URL ='../../images/s.gif';
	   var box=new Ext.ux.ImageField({src:'upload/default.jpg',uploadUrl:'up',swfuploadBase:base});
	   var form =new Ext.form.FormPanel({
	    width:800,
	    autoHeight:true,	
	    title:'iamge',
	    layout:'column',
	    items:[
	    {
	      columnWidth:.7,	 
	      layout:'fit',
	      border:true,
	      items:[box]   
	    },
	    {
	     columnWidth:.3,
	     layout:'form',
	     border:false,
	     labelWidth:50,
	     defaultType:'textfield',
	     items:[
	       {fieldLabel:'你好',name:'name'}
	     ]
	    }
	    ]
	   })
	   var viewPort =new Ext.Viewport({
	     layout:'anchor',
	     items:[form]	   
	   });
	   	   
	   
  })			 
 </script>
 <style>
   .blueborder
   {
     border:1px solid blue;
   }
 </style>
	</head>

	<body>


	</body>
</html>

